<?php
/**
 *
 * startup file
 * @author matt@cruelyouth.com
 * @version 1.0
 */
date_default_timezone_set('PRC');
header("Content-Type:text/html; charset=utf-8");

defined('DOCUMENT_PATH') or define('DOCUMENT_PATH', realpath(dirname(__FILE__)));
defined('LIB_PATH') or define('LIB_PATH', DOCUMENT_PATH."/libs");
defined('CONFIG_PATH') or define('CONFIG_PATH', DOCUMENT_PATH."/configs");
defined('APP_PATH') or define('APP_PATH', DOCUMENT_PATH.'/apps');
defined('VIEW_PATH') or define('VIEW_PATH', DOCUMENT_PATH.'/views');
defined('LOG_PATH') or define('LOG_PATH', DOCUMENT_PATH.'/logs');
defined('RESOURCE_PATH') or define('RESOURCE_PATH', DOCUMENT_PATH.'/res');
defined('CACHE_PATH') or define('CACHE_PATH',DOCUMENT_PATH.'/caches');

defined('CT_PAGE_SIZE') or define('CT_PAGE_SIZE',16);
defined('CT_UPLOAD_PATH') or define('CT_UPLOAD_PATH',DOCUMENT_PATH.'/upload/');
defined('CT_CACHE_PATH') or define('CT_CACHE_PATH',DOCUMENT_PATH.'/cachedata/');
defined('CT_SEPARATOR')	 or define('CT_SEPARATOR',',');
defined('CT_IMG_DOMAIN') or define('CT_IMG_DOMAIN','http://img.manhuaguoji.com');

defined('PHPLIB_PATH') or define('PHPLIB_PATH', DOCUMENT_PATH . '/../../phplib/');

defined('DOMAIN') or define('DOMAIN','manhuaguoji.com');
defined('UPLOAD_DOMAIN') or define('UPLOAD_DOMAIN','http://img.'.DOMAIN);

/**
 * 错误代码定义
 */
define('ERR_EXISTS',1001);		//已经存在
define('ERR_NOT_FOUND',1002);	//没有找到
define('ERR_PARAMATER',1003);	//参数错误

define('CURRENT_TIME',time());

set_include_path(get_include_path() . 
	PATH_SEPARATOR . LIB_PATH .
	PATH_SEPARATOR . APP_PATH
);

include_once(CONFIG_PATH . '/config.php');

require_once  PHPLIB_PATH . '_class.io.Graphic.inc.php';
require_once  PHPLIB_PATH . '_class.io.VerificationCode.inc.php';
require_once  PHPLIB_PATH . '_func.io.file.inc.php';
require_once  PHPLIB_PATH . '_func.util.date.inc.php';
//require_once PHPLIB_PATH . '_class.http.SoapClientEx.inc.php';
require_once  PHPLIB_PATH . 'login/class.securelogin.inc.php';
require_once  PHPLIB_PATH . '_class.http.MultiFetcher.inc.php';
require_once  PHPLIB_PATH . '_class.mail.PHPMailer.inc.php';


require_once(LIB_PATH . '/Loader.php');
spl_autoload_register(array('Loader', 'autoload'));
